package com.jxgk.service;

import com.jxgk.mapper.UserMapper;
import com.jxgk.pojo.Dept;
import com.jxgk.pojo.Dto;
import com.jxgk.pojo.User;
import com.jxgk.pojo.Zw;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class UserService {
    @Autowired
    private UserMapper userMapper;


    public List<Dto> findAll() {
        return userMapper.findAll();
    }

    public void del(Integer id) {
        userMapper.del(id);
    }

    public void add(User user) {
        userMapper.insertSelective(user);
    }

    public void update(User user) {
        userMapper.updateByPrimaryKeySelective(user);
    }

    public List<Dept> findDept() {
     return    userMapper.findDept();
    }

    public List<Zw> findZw() {
        return    userMapper.findZw();
    }


    public User fid(Integer uid) {
        return userMapper.fid(uid);
    }
}
